/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.aaron.platform.service;

import com.aaron.platform.dao.PageInfo;
import com.aaron.platform.exceptions.UserAlreadyExistException;
import com.aaron.platform.exceptions.UserNotExistException;
import com.aaron.platform.entity.ItscUserInfo;
import java.util.List;
import java.util.Properties;

/**
 * 用户操作业务接口
 * @author chenzhuohua
 */
public interface IUserService {

    public ItscUserInfo findUserById(Integer userId) throws UserNotExistException;

    public ItscUserInfo findUserByName(String userName) throws UserNotExistException;
    
    public ItscUserInfo findUserByChName(String userChName) throws UserNotExistException;

    public List<ItscUserInfo> findUsersByRoleId(Integer roleId);

    public List<ItscUserInfo> findUsersByCondition(Properties condition);
    
    public PageInfo findUsersByCondition(Properties condition, int startIndex, int pageSize);

    public PageInfo findUsersByPage(int pageSize, int startIndex);

    public List<ItscUserInfo> findAllUsers();

    public void addUser(ItscUserInfo userInfo) throws UserAlreadyExistException;

    public void updateUser(ItscUserInfo userInfo) throws UserNotExistException, UserAlreadyExistException;

    public void removeUser(Integer userId) throws UserNotExistException;

    public void lockUser(Integer userId) throws UserNotExistException;

    public void unlockUser(Integer userId) throws UserNotExistException;

    public UserSession getUserSession(String sessionId);

    public void addUserSession(UserSession userSession);

    public void removeUserSession(String sessionId);
}
